function CombiColumnChart(chartDiv,title,xaxisName,yaxisName,seriesMap,dataMap){
	this.chartDiv=chartDiv;
	this.title=title;
	this.xaxisName=xaxisName;
	this.yaxisName=yaxisName;
	this.dataMap=dataMap;
	this.seriesNameA ="";
	this.seriesNameB="";
	this.seriesMap = seriesMap;
	this.dataMap=dataMap;
	this.seriesNameArray ={};
	this.seriesProKeyArray={};
	this.numberSuffix="";
	this.showTotal = 0;
	this.type = 0;
	this.labelName="";
};

CombiColumnChart.prototype.setNumberSuffix = function(numberSuffix){
	this.numberSuffix=numberSuffix;
};

CombiColumnChart.prototype.setSeriesName = function(seriesNameA,seriesNameB){
	this.seriesNameA=seriesNameA;
	this.seriesNameB=seriesNameB;
};

CombiColumnChart.prototype.setLabelName = function(labelName){
	this.labelName = labelName;
};

CombiColumnChart.prototype.setKeyPattern = function(keyPattern){
	this.keyPattern = keyPattern;
};

CombiColumnChart.prototype.setSeriesArray = function(seriesProKeyArray,seriesNameArray){
	this.seriesProKeyArray = seriesProKeyArray;
	this.seriesNameArray = seriesNameArray;
};

CombiColumnChart.prototype.generateDataString = function(){
	this.chartString ="<chart caption='"+this.title+"' xaxisname='"+this.xaxisName+"' YAxisName='"+this.yaxisName+"' sNumberSuffix='%' baseFontSize='12' showValues='0' numberSuffix='"+this.numberSuffix+"' anchorRadius='5' lineThickness='2' formatNumber='0' formatNumberScale='0' palette='3'>";
	this.chartString +="<categories>";
	for(var key in this.seriesMap){
		var label= key+this.labelName;
		this.chartString+="<category label='"+label+"' />";
	}
	this.chartString +="</categories>";
	
	var seriesLenght = this.seriesProKeyArray.length;
	var showSeries = true;
	if(seriesLenght<1){
		showSeries = false;
	}
	for(var i = 0;i<seriesLenght;i++){
			this.chartString+="<dataset ";
			if(showSeries){
				var seriesName = this.seriesNameArray[i];
				if(seriesName === undefined){
					seriesName="";
				}
				this.chartString+="seriesName='"+this.seriesNameA+seriesName+"'";
			}
			this.chartString+=">";
			for(var level in this.seriesMap){
				var key = this.keyPattern.replace("{0}",this.seriesProKeyArray[i]);
				key = key.replace("{1}",level);
				var value = this.dataMap[key];
				if (value === undefined){
					value =0;
				}
	    		this.chartString+='<set value="'+value+'"/>';
			}
			this.chartString+="</dataset>";
		}
	
	this.chartString +="</chart>";
};
CombiColumnChart.prototype.draw = function(){
	this.generateDataString();
	var chart = new FusionCharts("../static/FusionCharts/MSColumn2D.swf", "ChartId", "726", "350", "0", "0");
    chart.setXMLData(this.chartString);
    chart.render(this.chartDiv);
};